package com.rd.student.jike.class1.guojiabao.Day0731;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;

public class Text01 {
    public static void main(String[] args) {
        int[] a = new int[50];
        for (int i = 0; i < a.length; i++) {
             a[i] = i+1;
        }
        ArrayList<Integer> arrayList = new ArrayList<>(a.length);
        for (int i = 0; i < a.length; i++) {
            arrayList.add(a[i]);
        }
        Collections.shuffle(arrayList);
        for (int i = 0; i < 20; i++) {
            System.out.println(arrayList.get(i));

        }
    }
}
